Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Set x-google-api-name in OpenAPI document.#139

Merged
inklesspen merged 1 commit intocloudendpoints:masterfrom
inklesspen:x-google-api-name
Feb 26, 2018
Merged

Set x-google-api-name in OpenAPI document.#139
inklesspen merged 1 commit intocloudendpoints:masterfrom
inklesspen:x-google-api-name

Conversation

@inklesspen
Copy link
Copy Markdown
Contributor

@inklesspen inklesspen commented Feb 24, 2018

This allows combining multiple APIs with different names into the same
service. API names must now match a regular expression; they can
consist of up to 40 lowercase letters and numbers, except that the
first character must be a lowercase letter.

Fixes #47, fixes #74.

This allows combining multiple APIs with different names into the same
service. API names must now match a regular expression; they can
consist of up to 40 lowercase letters and numbers, except that the
first character must be a lowercase letter.
Copy link
Copy Markdown

@kryzthov kryzthov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Comment thread endpoints/api_config.py

def _CheckApiName(name):
valid = (_VALID_API_NAME.match(name) is not None)
if not valid:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe compact to if not _VALID_API_NAME.match(name)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 recommends being explicit about checking if a value is None.

@inklesspen inklesspen merged commit 047fe7f into cloudendpoints:master Feb 26, 2018
@inklesspen inklesspen deleted the x-google-api-name branch February 26, 2018 20:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

2 participants